<template>
	<view class="main_box">
		<view class="fix_title">
			2/8验证身份证件信息
		</view>
		<view class="txt">
			<text>请拍摄或上传本人身份证照片</text>
			<image src="/static/images/blank/irker.png" mode="" @click="toExpanrs"></image>
		</view>
		<view class="txt_two">
			请确保身份证照片清晰可辨识
		</view>
		<template v-if="phoneType=='ios'">
			<view class="up" @click="toUpIndentity">
				<image :class="imgUrl1=='/static/images/blank/perup.png'?'ims':'ims2'" :src="imgUrl1"
					mode="aspectFit">
				</image>
				<image v-show="imgShow" :src="imgSrc" mode="aspectFit"></image>
			</view>
			<view class="undown" @click="toUndownIndentity">
				<image :class="imgUrl2=='/static/images/blank/perundown.png'?'ims':'ims2'" :src="imgUrl2"
					mode="aspectFit">
				</image>
				<image v-show="imgShow2" :src="imgSrc2" mode="aspectFit"></image>
			</view>
		</template>
		<template v-if="phoneType=='android'">
			<view class="up6" @click="toUpIndentity">
				<image :src="imgUrl1" mode="aspectFit">
				</image>
				<image v-show="imgShow" :src="imgSrc" mode="aspectFit"></image>
			</view>
			<view class="undown6" @click="toUndownIndentity">
				<image :src="imgUrl2" mode="aspectFit">
				</image>
				<image v-show="imgShow2" :src="imgSrc2" mode="aspectFit"></image>
			</view>
		</template>
		<!-- <view class="up" @click="toUpIndentity">
			<image :class="imgUrl1=='/static/images/blank/perup.png'?'ims':'ims2'" :src="imgUrl1" mode="aspectFit">
			</image>
			<image v-show="imgShow" :src="imgSrc" mode="aspectFit"></image>
		</view>
		<view class="undown" @click="toUndownIndentity">
			<image :class="imgUrl2=='/static/images/blank/perundown.png'?'ims':'ims2'" :src="imgUrl2" mode="aspectFit">
			</image>
			<image v-show="imgShow2" :src="imgSrc2" mode="aspectFit"></image>
		</view> -->
		<view class="btn" @click="toGetFace">
			下一步
		</view>
		<view class="log">
			我们将依法保护您的个人信息安全<text @click="toExpare">隐私政策</text>
		</view>
		<view class="kdn">
			<image src="/static/images/blank/4341yu.png" mode=""></image>
			<view class="subx">
				交通银行 提供产品服务
			</view>
		</view>
		<uni-popup ref="popup" background-color="#fff">
			<view class="popup-content">
				<image src="/static/images/blank/lohf.png" mode="" @click="closePuop"></image>
				<view class="tops">
					信息确认
				</view>
				<view class="mains">
					<view class="ps">
						<text>姓名</text>
						<text>:</text>
						<text>{{userInfo.name}}</text>
					</view>
					<view class="ps">
						<text>签发机关</text>
						<text>:</text>
						<text>{{userInfo.authority}}</text>
					</view>
					<view class="ps">
						<text>证件类型</text>
						<text>:</text>
						<text>居民身份证</text>
					</view>
					<view class="ps">
						<text>身份证</text>
						<text>:</text>
						<text>{{userInfo.id_number}}</text>
					</view>
					<view class="ps">
						<text>证件有效期</text>
						<text>:</text>
						<text>{{userInfo.expiration}}</text>
					</view>
					<view class="ps">
						<text>性别</text>
						<text>:</text>
						<text>{{userInfo.sex}}</text>
					</view>
					<view class="xs">
						<text>国籍</text>
						<text>:</text>
						<text>中国</text>
					</view>
					<view class="fs">
						<view class="dn">
							<view class="lk">
								身份证地址
							</view>
							<view class="bk">
								:
							</view>
						</view>
						{{userInfo.address}}
					</view>
				</view>
				<view class="btng">
					<view class="bleft" @click="restMake">
						重新识别
					</view>
					<view class="bleft" @click="putOwnInfo">
						修改
					</view>
					<view class="bright" @click="meAgree">
						确认
					</view>
				</view>
			</view>
		</uni-popup>
		<view v-if="kou" class="hui" @click.stop="boxMap">
			<view class="pop" @click.stop="hsxMap">
				<view class="tob" @click.stop="smallMap">
					<image src="/static/images/blank/kiiiuu.png" mode=""></image>
				</view>
				<view class="tod">
					<image src="/static/images/blank/sfdd.png" mode=""></image>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getPhoneCode,
		getTwoUserList,
		putIdentity,
		idCardOCR,
		getH5FaceCheckGetUrl
	} from '../../common/api/blank.js';
	import {
		_showLoading,
		_showToast
	} from '../../common/js/util.js'
	import {
		period
	} from "../../common/js/period.js"
	var cameraModule = uni.requireNativePlugin('yun-camerax-module')
	export default {
		data() {
			return {
				imgUrl1: "/static/images/blank/perup.png",
				imgUrl2: "/static/images/blank/perundown.png",
				off: true,
				off2: false,
				userInfo: {
					sex: '', //性别
					expiration: '', //有效期限
					authority: '', //签发机关
					name: '', //姓名
					id_number: '', //身份证号
					address: '', //地址
					backImage: "",
					frontImage: ""
				},
				eventOff: true,
				upLoad: true, //是否调用上传接口
				imgShow: false, //人脸
				imgShow2: false, //国徽
				imgSrc: '',
				imgSrc2: "",
				kou: false,
				bac: "",
				fon: "",
				phoneType: ""
			}
		},
		onLoad() {
			let sy = uni.getSystemInfoSync()
			// console.log(sy)
			this.phoneType = sy.osName
			// console.log(uni.getStorageSync("s_userId"))
			// // this.userInfo.userId = uni.getStorageSync("s_userId");
			// console.log(this.imgShow, this.imgShow2)
			// uni.navigateTo({
			// 	url: `/pageBlank/collectionH5/collectionH5`
			// })

		},
		onBackPress(options) {
			if (options.from === 'navigateBack') {
				return false
			}
			this.back();
			return true
		},
		components: {

		},
		methods: {
			closePuop() {
				console.log(122)
				this.$refs.popup.close()
			},
			async restMake() {
				uni.showLoading({
					title: '识别中',
					mask: true
				})
				const res = await idCardOCR({
					backImage: this.userInfo.backImage,
					frontImage: this.userInfo.frontImage,
					orgId: uni.getStorageSync("orgId")
				})
				if (res.code == 0) {
					uni.hideLoading()
					console.log(res)
					this.imgShow = true
					this.imgSrc = '/static/images/blank/ggy.png'
					this.imgShow2 = true
					this.imgSrc2 = "/static/images/blank/ggy.png"
					Object.keys(this.userInfo).forEach(i => {
						this.userInfo[i] = res.data[i]
					})
					this.userInfo.backImage = this.bac
					this.userInfo.frontImage = this.fon
					_showToast("成功")

				} else {
					_showToast(res.msg)
					uni.hideLoading()
				}
			},
			toExpare() {
				let url = '/stu_side_h5/xj/privacy_policy.html' + '&title=' + '隐私政策'
				uni.navigateTo({
					url: '../../pages/login/userAgreement?url=' + url
				})
			},
			smallMap() {
				this.kou = false
			},
			boxMap() {
				this.kou = false
			},
			hsxMap() {},
			toExpanrs() {
				this.kou = !this.kou
			},
			back() {
				if (!this.upLoad) {
					// console.log("上传中，请勿中断!")
				} else {
					var pages = getCurrentPages();
					uni.navigateBack()
				}
			},
			putOwnInfo() {
				if (this.userInfo.sex == '男') {
					var h_sex = '1'
				} else {
					var h_sex = '2'
				}
				try {
					uni.setStorageSync('office', this.userInfo.authority)
					uni.setStorageSync('userName', this.userInfo.name);
					// console.log(this.userInfo.name, '先这里')
					uni.setStorageSync('idNo', this.userInfo.id_number);
					// uni.setStorageSync('imageOrderNo', res.data);
					uni.setStorageSync('sex', h_sex);
					uni.setStorageSync('validDate', this.userInfo.expiration);
					uni.setStorageSync('liveAddress', this.userInfo.address);
				} catch (e) {}
				// console.log(this.userInfo)
				uni.navigateTo({
					url: `/pageBlank/components/infoEndChange?backImage=${encodeURIComponent(JSON.stringify(this.userInfo.backImage))}&frontImage=${encodeURIComponent(JSON.stringify(this.userInfo.frontImage))}`
				})
				this.$refs.popup.close()
			},
			//确认
			async meAgree() {
				let sign = []
				let arrId = Object.keys(this.userInfo).forEach(item => {
					if (this.userInfo[item]) {

					} else {
						sign.push(item)
					}
				})
				console.log(sign)
				if (sign.length == 0) {
					var timeOut = period(this.userInfo.expiration)
					if (timeOut) {
						this.off2 = true
						this.upLoad = false
						uni.showLoading({
							title: '上传中，请稍候'
						})
						this.eventOff = false
						if (this.userInfo.sex == '男') {
							var h_sex = '1'
						} else {
							var h_sex = '2'
						}
						this.$refs.popup.close()
						var timeCard = this.userInfo.expiration
						timeCard = timeCard.substr(timeCard.indexOf('-') + 1, 10)
						timeCard = timeCard.replace(/[.]/g, '')
						let s_userId = uni.getStorageSync("s_userId");
						const res = await putIdentity({
							"userId": s_userId,
							"genderTpCode": h_sex,
							"validDate": timeCard,
							"office": this.userInfo.authority,
							"userName": this.userInfo.name,
							"idNo": this.userInfo.id_number,
							"cardNo": "",
							"address": this.userInfo.address,
							"backImage": this.userInfo.backImage,
							"frontImage": this.userInfo.frontImage,
							"orgId": uni.getStorageSync("orgId")
						})
						try {
							uni.setStorageSync('userName', this.userInfo.name);
							uni.setStorageSync('idNo', this.userInfo.id_number);
							uni.setStorageSync('imageOrderNo', res.data);
							uni.setStorageSync('sex', this.userInfo.sex);
							uni.setStorageSync('validDate', this.userInfo.expiration);
							uni.setStorageSync('liveAddress', this.userInfo.address);
						} catch (e) {}
						if (res.code === 0) {
							this.upLoad = true
							uni.hideLoading()
							this.off2 = false
							uni.navigateTo({
								url: `/pageBlank/collectionH5/collectionH5`
							})
						} else {
							uni.hideLoading()
							this.upLoad = true
							uni.showToast({
								icon: 'none',
								title: res.msg
							})
							this.off2 = false
						}
					} else {
						uni.showToast({
							icon: "none",
							title: "身份证已过期"
						})

						return
					}

				} else {
					_showToast("信息不全,请手动修改！")
				}

			},
			async toGetFace() {
				if (!this.userInfo.backImage || !this.userInfo.frontImage) {
					if (!this.userInfo.backImage) {
						uni.showModal(({
							title: '提示',
							content: "身份证人像面未上传",
							showCancel: false,
						}))
						return
					}
					if (!this.userInfo.frontImage) {
						uni.showModal(({
							title: '提示',
							content: "身份证国徽面未上传",
							showCancel: false,
						}))
						return
					}
				} else {

					try {
						uni.showLoading({
							title: '识别中',
							mask: true
						})
						const res = await idCardOCR({
							backImage: this.userInfo.backImage,
							frontImage: this.userInfo.frontImage,
							orgId: uni.getStorageSync("orgId")
						})
						if ('code' in res) {
							if (res.code == 0) {
								uni.hideLoading()
								this.imgShow = true
								this.imgSrc = '/static/images/blank/ggy.png'
								this.imgShow2 = true
								this.imgSrc2 = "/static/images/blank/ggy.png"
								Object.keys(this.userInfo).forEach(i => {
									this.userInfo[i] = res.data[i]
								})
								this.userInfo.backImage = this.bac
								this.userInfo.frontImage = this.fon
								this.off = true
								this.$refs.popup.open()
								_showToast("成功")
								let reg =
									/^([1-9][0-9][0-9][0-9])\.((1[0-2])||(0[1-9]))\.((0[1-9])||([1-2][0-9])||(3[0-1]))-([1-9][0-9][0-9][0-9])\.((1[0-2])||(0[1-9]))\.((0[1-9])||([1-2][0-9])||(3[0-1]))$/
								if (reg.test(this.userInfo.expiration)) {
									var timePut = period(this.userInfo.expiration)
								} else {
									uni.showModal({
										title: '有效期格式为',
										content: '例：2000.01.01-2022.07.15',
										showCancel: false,
										success: (res => {
											if (res.confirm) {
												this.userInfo
													.expiration = ""
												console.log('用户点击确定');
											}
										})
									});
									return
								}
							} else {
								_showToast(res.msg)
								uni.hideLoading()
							}
						} else {
							_showToast(JSON.stringify(res))
							uni.hideLoading()
						}
					} catch (e) {
						_showToast(e)
						//TODO handle the exception
					}
				}
			},
			//人脸面
			toUpIndentity() {
				//#ifdef APP-PLUS
				if (this.phoneType == 'android') {
					let that = this;
					that.imgShow = false
					cameraModule.takePhoto({
						type: 0,
						imageIndex: 2
					}, res => {
						var src = "file:/" + res.file; //必须加file:/不然image无法识别
						plus.zip.compressImage({
								src: src,
								dst: src.replace('.png', 'yasuo.png').replace('.PNG',
										'yasuo.PNG').replace('.jpg', 'yasuo.jpg')
									.replace('.JPG', 'yasuo.JPG'),
								width: 'auto', //dst: (String 类型 )压缩转换目标图片的路径，这里先在后面原始名后面加一个yasuo区分一下
								height: 'auto', //width,height: (String 类型 )缩放图片的宽度,高度
								quality: 50, //quality: (Number 类型 )压缩图片的质量
								overwrite: true, //overwrite: (Boolean 类型 )覆盖生成新文件
								format: 'jpg' //format: (String 类型 )压缩转换后的图片格式
							},
							function(e) {
								let reader = new plus.io.FileReader();
								reader.readAsDataURL(e.target);
								reader.onloadend = function(e) {
									// console.log(e)
									//这是转成功的base64文件，需要正则去一下换行
									let base64 = e.target.result.split(',')[1]
										.replace(/[\r\n]/g, "")
									that.imgUrl1 = e.target.result.replace(
										/[\r\n]/g, "")
									that.userInfo.backImage = base64
									that.bac = base64
									// console.log(that.userInfo.backImage)
								};
							},
							function(err) {
								plus.nativeUI.alert('未知错误！', function() {});
							}
						);
					})
				} else if (this.phoneType == 'ios') {
					let that = this;
					uni.chooseImage({
						count: 1, //默认9
						sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
						sourceType: ['album', 'camera'], //从相册选择
						success: function(res) {
							// console.log(res)
							plus.zip.compressImage({
									src: res.tempFilePaths[0], //src: 压缩原始图片的路径    
									dst: res.tempFilePaths[0].replace('.png',
											'yasuo.png').replace('.PNG',
											'yasuo.PNG').replace('.jpg',
											'yasuo.jpg')
										.replace('.JPG', 'yasuo.JPG'),
									width: '40%', //dst: (String 类型 )压缩转换目标图片的路径，这里先在后面原始名后面加一个yasuo区分一下
									height: '40%', //width,height: (String 类型 )缩放图片的宽度,高度
									quality: 50, //quality: (Number 类型 )压缩图片的质量
									overwrite: true, //overwrite: (Boolean 类型 )覆盖生成新文件
									format: 'jpg' //format: (String 类型 )压缩转换后的图片格式
								},
								function(e) {
									plus.io.resolveLocalFileSystemURL(e.target, (
										entry) => {
										entry.file((file) => {
												var reader =
													new plus
													.io
													.FileReader();
												reader.readAsDataURL(
													file
												); //reader图像预览
												reader.onloadend =
													(
														e
													) => {
														let base64 =
															e
															.target
															.result
															.split(
																','
															)[
																1
															]
															.replace(
																/[\r\n]/g,
																""
															)
														that.imgUrl1 =
															e
															.target
															.result
															.replace(
																/[\r\n]/g,
																""
															)
														that.userInfo
															.backImage =
															base64
														that.bac =
															base64

													};
											},
											(e) => {
												console
													.log('error---',
														e
													)
											});
									});
								},
								function(err) {
									plus.nativeUI.alert('未知错误！', function() {});
								}
							);
						}
					});
				} else {

				}
				// #endif
				//#ifdef H5
				let that = this;
				uni.chooseImage({
					count: 1, //默认9
					sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['album'], //从相册选择
					success: function(res) {
						// console.log(res)
						that.getBase64(res.tempFiles[0]).then((resd) => {
							that.imgUrl1 = resd
							that.userInfo.backImage = resd.substr(23, resd
								.length);
						})
					}
				});
				//#endif
			},
			//h5转base64
			getBase64(file) {
				return new Promise((resolve, reject) => {
					const reader = new FileReader()
					reader.readAsDataURL(file)
					reader.onload = () => resolve(reader.result)
					reader.onerror = (error) => reject(error)
				})
			},
			//获取base64图片大小，返回kb数字
			showSize(base64url) {
				//把头部去掉
				let str = base64url.replace('data:image/png;base64,', '');
				// 找到等号，把等号也去掉
				let equalIndex = str.indexOf('=');
				if (str.indexOf('=') > 0) {
					str = str.substring(0, equalIndex);
				}
				// 原来的字符流大小，单位为字节
				let strLength = str.length;
				// 计算后得到的文件流大小，单位为字节
				let fileLength = parseInt(strLength - (strLength / 8) * 2);
				// 由字节转换为kb
				let size = "";
				size = (fileLength / 1024).toFixed(2);
				let sizeStr = size + ""; //转成字符串
				let index = sizeStr.indexOf("."); //获取小数点处的索引
				let dou = sizeStr.substr(index + 1, 2) //获取小数点后两位的值
				if (dou == "00") { //判断后两位是否为00，如果是则删除00                
					return sizeStr.substring(0, index) + sizeStr.substr(index + 3, 2)
				}
				return size;
			},
			//国徽面
			toUndownIndentity() {
				//#ifdef APP-PLUS
				if (this.phoneType == 'android') {
					let that = this;
					that.imgShow2 = false
					cameraModule.takePhoto({
						type: 1,
						imageIndex: 2
					}, res => {
						var src = "file:/" + res.file; //必须加file:/不然image无法识别
						plus.zip.compressImage({
								src: src,
								dst: src.replace('.png', 'yasuo.png').replace('.PNG',
										'yasuo.PNG').replace('.jpg', 'yasuo.jpg')
									.replace('.JPG', 'yasuo.JPG'),
								width: 'auto', //dst: (String 类型 )压缩转换目标图片的路径，这里先在后面原始名后面加一个yasuo区分一下
								height: 'auto', //width,height: (String 类型 )缩放图片的宽度,高度
								quality: 50, //quality: (Number 类型 )压缩图片的质量
								overwrite: true, //overwrite: (Boolean 类型 )覆盖生成新文件
								format: 'jpg' //format: (String 类型 )压缩转换后的图片格式
							},
							function(e) {
								let reader = new plus.io.FileReader();
								reader.readAsDataURL(e.target);
								reader.onloadend = function(e) {

									//这是转成功的base64文件，需要正则去一下换行
									let base64 = e.target.result.split(',')[1]
										.replace(/[\r\n]/g, "")
									console.log("笑死")
									that.imgUrl2 = e.target.result.replace(
										/[\r\n]/g, "")
									that.userInfo.frontImage = base64
									that.fon = base64
									// console.log(that.userInfo.frontImage)
								};
							},
							function(err) {
								plus.nativeUI.alert('未知错误！', function() {});
							}
						);
					})
				} else if (this.phoneType == 'ios') {
					let that = this;
					uni.chooseImage({
						count: 1, //默认9
						sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
						sourceType: ['album', 'camera'], //从相册选择
						success: function(res) {
							console.log(res)
							plus.zip.compressImage({
									src: res.tempFilePaths[0], //src: 压缩原始图片的路径    
									dst: res.tempFilePaths[0].replace('.png',
											'yasuo.png').replace('.PNG',
											'yasuo.PNG').replace('.jpg',
											'yasuo.jpg')
										.replace('.JPG', 'yasuo.JPG'),
									width: '40%', //dst: (String 类型 )压缩转换目标图片的路径，这里先在后面原始名后面加一个yasuo区分一下
									height: '40%', //width,height: (String 类型 )缩放图片的宽度,高度
									quality: 50, //quality: (Number 类型 )压缩图片的质量
									overwrite: true, //overwrite: (Boolean 类型 )覆盖生成新文件
									format: 'jpg' //format: (String 类型 )压缩转换后的图片格式
								},
								function(e) {
									plus.io.resolveLocalFileSystemURL(e.target, (
										entry) => {
										entry.file((file) => {
												var reader =
													new plus
													.io
													.FileReader();
												reader.readAsDataURL(
													file
												); //reader图像预览
												reader.onloadend =
													(
														e
													) => {
														let base64 =
															e
															.target
															.result
															.split(
																','
															)[
																1
															]
															.replace(
																/[\r\n]/g,
																""
															)
														that.imgUrl2 =
															e
															.target
															.result
															.replace(
																/[\r\n]/g,
																""
															)
														that.userInfo
															.frontImage =
															base64
														that.fon =
															base64
													};
											},
											(e) => {
												console
													.log('error---',
														e
													)
											});
									});
								},
								function(err) {
									plus.nativeUI.alert('未知错误！', function() {});
								}
							);
						}
					});
				} else {

				}

				// #endif
				//#ifdef H5
				let that = this;
				uni.chooseImage({
					count: 1, //默认9
					sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有
					sourceType: ['album'], //从相册选择
					success: function(res) {
						that.getBase64(res.tempFiles[0]).then((resd) => {
							that.imgUrl2 = resd
							that.userInfo.frontImage = resd.substr(23, resd
								.length);
						})
					}
				});
				//#endif
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main_box {
		width: 100%;
		overflow-y: auto;
		// height: 100vh;

		.log {
			display: flex;
			justify-content: center;
			margin-top: 22rpx;
			height: 35rpx;
			font-size: 24rpx;
			font-family: Source Han Sans CN-Light, Source Han Sans CN;
			font-weight: 300;
			color: #666;
			line-height: 35rpx;

			text {
				font-size: 24rpx;
				font-family: Source Han Sans CN-Light, Source Han Sans CN;
				font-weight: 300;
				color: #519FF4;
			}
		}

		.kdn {
			margin: 86rpx 0rpx;
			width: 100%;
			display: flex;
			justify-content: center;
			align-items: center;

			>image {
				width: 34rpx;
				height: 33rpx;
			}

			.subx {
				margin-left: 8rpx;
				height: 34rpx;
				font-size: 23rpx;
				font-family: Source Han Sans CN-Regular, Source Han Sans CN;
				font-weight: 400;
				color: #003A79;
				line-height: 34rpx;
			}
		}

		.hui {
			position: fixed;
			top: 0rpx;
			left: 0rpx;
			z-index: 999;
			width: 100%;
			height: 100vh;
			background: rgba(0, 0, 0, 0.2);

			.pop {
				position: absolute;
				z-index: 9;
				bottom: 0rpx;
				left: 0rpx;
				display: flex;
				flex-direction: column;
				width: 100%;
				height: 906rpx;

				.tob {
					display: flex;
					justify-content: center;
					align-items: center;
					width: 100%;
					height: 62rpx;
					background: #F6F6F6;
					border-radius: 32rpx 32rpx 0rpx 0rpx;
					opacity: 1;

					image {
						width: 31rpx;
						height: 13rpx;
					}
				}

				.tod {
					display: flex;
					flex: 1;
					justify-content: center;
					box-sizing: border-box;
					padding-top: 70rpx;
					background: #FFFFFF;

					image {
						width: 634rpx;
						height: 586rpx;
					}
				}
			}
		}

		.popup-content {
			width: 622rpx;
			height: auto;
			background: #fff;
			border-radius: 12rpx;
			opacity: 1;
			box-sizing: border-box;
			display: flex;
			flex-direction: column;
			padding-top: 28rpx;
			position: relative;

			>image {
				position: absolute;
				z-index: 999;
				top: 28rpx;
				right: 30rpx;
				width: 34rpx;
				height: 34rpx;
			}

			.tops {
				height: 49rpx;
				text-align: center;
				font-size: 34rpx;
				font-family: Source Han Sans CN-Medium, Source Han Sans CN;
				font-weight: 500;
				color: #000000;
				line-height: 49rpx;
				margin-bottom: 41rpx;
			}

			.mains {
				box-sizing: border-box;
				padding: 0 60rpx;
				border-bottom: 1rpx solid #ccc;

				.ps {

					display: flex;
					margin-bottom: 36rpx;

					text {
						height: 37rpx;
						width: 1rpx;
						line-height: 37rpx;
						margin-right: 20rpx;
					}

					text:first-child {
						width: 156rpx;
						height: 37rpx;
						font-size: 26rpx;
						font-family: Source Han Sans CN-Medium, Source Han Sans CN;
						font-weight: 500;
						color: #333333;
						line-height: 37rpx;
						text-align-last: justify;

					}

					text:last-child {
						min-width: 285rpx;
						height: 37rpx;
						font-size: 26rpx;
						font-family: Source Han Sans CN-Regular, Source Han Sans CN;
						font-weight: 400;
						color: #333333;

					}
				}

				.xs {
					display: flex;
					margin-bottom: 25rpx;

					text {
						height: 37rpx;
						width: 1rpx;
						line-height: 37rpx;
						margin-right: 20rpx;
					}

					text:first-child {
						width: 156rpx;
						height: 37rpx;
						font-size: 26rpx;
						font-family: Source Han Sans CN-Medium, Source Han Sans CN;
						font-weight: 500;
						color: #333333;
						line-height: 37rpx;
						text-align-last: justify;

					}

					text:last-child {
						min-width: 260rpx;
						height: 37rpx;
						font-size: 26rpx;
						font-family: Source Han Sans CN-Regular, Source Han Sans CN;
						font-weight: 400;
						color: #333333;

					}
				}

				.fs {
					height: auto;
					margin-bottom: 46rpx;
					font-size: 26rpx;
					font-family: Source Han Sans CN-Regular, Source Han Sans CN;
					font-weight: 400;
					color: #333333;
					line-height: 60rpx;

					.dn {
						float: left;
						height: 60rpx;
						display: flex;

						.lk {
							width: 156rpx;
							height: 60rpx;
							line-height: 60rpx;
							text-align-last: justify;
							font-size: 26rpx;
							font-family: Source Han Sans CN-Regular, Source Han Sans CN;
							font-weight: 400;
							color: #333333;
						}

						.bk {
							height: 60rpx;
							line-height: 60rpx;
							margin-right: 16rpx;
							margin-left: 19rpx;
							font-size: 35rpx;
							font-family: Source Han Sans CN-Regular, Source Han Sans CN;
							font-weight: 500;
							color: #333333;
						}
					}
				}
			}

			.btng {
				display: flex;
				justify-content: space-between;
				height: 109rpx;
				align-items: center;

				.bleft {
					width: 206rpx;
					text-align: center;
					height: 109rpx;
					line-height: 109rpx;
					font-size: 34rpx;
					font-family: PingFangSC-Medium-, PingFangSC-Medium;
					font-weight: normal;
					color: #000000;
					box-sizing: border-box;
					border-right: 1rpx solid #ccc;
				}

				.bright {
					width: 206rpx;
					text-align: center;
					height: 109rpx;
					font-size: 34rpx;
					font-family: PingFangSC-Medium-, PingFangSC-Medium;
					font-weight: normal;
					color: #000000;
					line-height: 109rpx;
				}
			}

		}

		.up6 {
			width: 515rpx;
			height: 320rpx;
			background: #F7F7F7;
			margin: 0 auto;
			margin-bottom: 32rpx;
			position: relative;

			image:first-child {
				width: 100%;
				height: 100%;
				// transform: rotate(90deg);
				// object-fit: cover
			}

			image:last-child {
				opacity: 0.8;
				position: absolute;
				z-index: 1;
				top: 0rpx;
				left: 0rpx;
				width: 100%;
				height: 100%;
			}
		}

		.up {
			width: 515rpx;
			height: 320rpx;
			// background: #F7F7F7;
			margin: 0 auto;
			margin-bottom: 32rpx;
			position: relative;
			display: flex;
			justify-content: center;
			align-items: center;

			.ims {
				width: 100%;
				height: 100%;
			}

			.ims2 {
				// width: 515rpx;
				height: 320rpx;
			}

			// image:first-child {
			// 	width: 100%;
			// 	height: 100%;
			// 	transform: rotate(90deg);
			// 	// object-fit: cover
			// }

			image:last-child {
				opacity: 0.8;
				position: absolute;
				z-index: 1;
				top: 0rpx;
				left: 0rpx;
				width: 100%;
				height: 100%;
			}

		}

		.undown6 {
			width: 515rpx;
			height: 320rpx;
			background: #F7F7F7;
			margin: 0 auto;
			margin-bottom: 32rpx;
			position: relative;

			image:first-child {
				width: 100%;
				height: 100%;
			}

			image:last-child {
				opacity: 0.8;
				position: absolute;
				z-index: 1;
				top: 0rpx;
				left: 0rpx;
				width: 100%;
				height: 100%;
			}
		}

		.undown {
			width: 515rpx;
			height: 320rpx;
			// background: #F7F7F7;
			margin: 0 auto;
			margin-bottom: 32rpx;
			position: relative;
			display: flex;
			justify-content: center;
			align-items: center;

			.ims {
				width: 100%;
				height: 100%;
			}

			.ims2 {
				// width: 515rpx;
				height: 320rpx;
			}

			// image:first-child {
			// 	width: 100%;
			// 	height: 100%;
			// }

			image:last-child {
				opacity: 0.8;
				position: absolute;
				z-index: 1;
				top: 0rpx;
				left: 0rpx;
				width: 100%;
				height: 100%;
			}

		}

		.btn {
			width: 358rpx;
			height: 88rpx;
			line-height: 88rpx;
			text-align: center;
			background: #3478F5;
			box-shadow: 0rpx 3rpx 26rpx 1rpx rgba(55, 98, 244, 0.58);
			border-radius: 44rpx 44rpx 44rpx 44rpx;
			opacity: 1;
			font-size: 32rpx;
			font-family: Source Han Sans CN-Light, Source Han Sans CN;
			font-weight: 300;
			color: #FFFFFF;
			margin: 0 auto;
		}

		.fix_title {
			margin: 30upx 0 60upx 0;
			font-size: 40upx;
			font-weight: bolder;
			display: flex;
			align-items: center;
			margin-left: 10rpx;

			&::before {
				content: '';
				height: 36upx;
				width: 12upx;
				background-image: linear-gradient(to bottom, #c3defc, #007AFF);
				margin-right: 12upx;
				border-radius: 6upx;
			}
		}

		.txt {
			margin-bottom: 7rpx;
			margin-left: 32rpx;
			display: flex;
			align-items: center;

			text {
				font-size: 32rpx;
				font-family: Source Han Sans CN-Medium, Source Han Sans CN;
				font-weight: 500;
				color: #020202;
			}

			image {
				margin: auto 10rpx;
				width: 25rpx;
				height: 25rpx;
			}

		}

		.txt_two {
			height: 37rpx;
			font-size: 26rpx;
			font-family: Source Han Sans CN-Regular, Source Han Sans CN;
			font-weight: 400;
			color: #6A6A6C;
			line-height: 37rpx;
			margin-bottom: 68rpx;
			margin-left: 32rpx;
		}
	}
</style>